<?php
global $language, $base_url, $base_path;
$data = $items['data'];
$action_prefix = "/".$language->language . $base_path;
?>
<div class="search-section">

  <div class="search-bar">
      <form method="get" action="<?php print $action_prefix; ?>experiences/search/0" accept-charset="UTF-8">
        <input type="text" name="query" id="query" value="<?php print $items['keywords'];?>" class="search-bar-input">
          <button type="Submit" class="btn btn-primary red-btn">
              <?php print t("Search");?>
          </button>
      </form>
  </div>


  <div class="row">

  <?php foreach ($data as $key => $item): ?>
    <?php if($key > 5) break; $img_url = image_style_url('large', $item->uri); ?>
    <div class="card3 card3-medium span4">

      <div class="card3-photo">
        <a href="<?php print $action_prefix . "experience/" . $item->nid; ?>">
        <div class="img" style="background: #242731 url('<?php print $img_url;?>') no-repeat center center;"></div>
        </a>
      </div>

      <div class="card3-details">
        <div class="card3-name"><a href="<?php print $action_prefix . "experience/" . $item->nid; ?>"><?php print $item->title; ?></a></div>  
        <div class="card3-user"><?php print t("with"); ?> <a href="<?php print $action_prefix . "profile/". $item->uid; ?>"><?php print $item->exp_name; ?></a></div> 
        <div class="card3-description">
          <a href="<?php print $action_prefix . "experience/" . $item->nid; ?>"><?php print $item->datail;?></a>
        </div>
      </div>

    </div>

  <?php endforeach; ?>
  </div>
  <div class="page-bar">
    <?php if($items['page'] > 1):?>
    <div class="pull-left" style="margin-bottom: 40px;">
      <a class="btn btn-large" href="<?php print $action_prefix .'experiences/search/'.($items['page']-2).'?query='.$items['keywords'];?>">
        <i class="icon icon-arrow-left">
        </i>
        <?php print t("Back");?>
      </a>
    </div>
    <?php endif;?>
    <?php if(count($items['data'])>6): ?>
    <div class="pull-right" style="margin-bottom: 40px;">
      <a class="btn btn-primary btn-large" href="<?php print $action_prefix .'experiences/search/'.$items['page'].'?query='.$items['keywords'];?>">
        <?php print t("More trip");?>
      </a>
    </div>
    <?php endif; ?>
  </div>
</div>
<div class="promo-outer">
</div>
